package com.qf.Utils;

import lombok.Data;
import org.springframework.security.crypto.bcrypt.BCrypt;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: 你的名字
 * @Date: 2021/07/14/21:18
 * @Description:
 */

public class PassWordUtil {
    public static String hashpw(String pw) {
        return BCrypt.hashpw(pw,BCrypt.gensalt());
    }

    public static Boolean checkpw(String pw, String dbPw) {
        return BCrypt.checkpw(pw,dbPw);
    }
}
